<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FileRecycle</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>FileRecycle</h1>

<p>Sends a file or directory to the recycle bin, if possible.</p>

<pre class="Syntax">FileRecycle, FilePattern</pre>
<h3>Parameters</h3>
<dl>

  <dt>FilePattern</dt>
  <dd><p>The name of a single file or a wildcard pattern such as C:\Temp\*.tmp. <em>FilePattern</em> is assumed to be in <a href="../Variables.htm#WorkingDir">%A_WorkingDir%</a> if an absolute path isn't specified.</p>
      <p>To recycle an entire directory, provide its name without a trailing backslash.</p></dd>

</dl>

<h3>ErrorLevel</h3>
<p><span class="ver">[v1.1.04+]</span> This command is able to throw an exception on failure. For more information, see <a href="Catch.htm#RuntimeErrors">Runtime Errors</a>.</p>
<p><a href="../misc/ErrorLevel.htm">ErrorLevel</a> is set to 1 if there was a problem or 0 otherwise.</p>
<h3>Remarks</h3>
<p><a href="http://msdn.microsoft.com/en-us/library/bb762164.aspx">SHFileOperation</a> is used to do the actual work. This function may permanently delete the file if it is too large to be recycled; as of v1.0.96, a warning should be shown before this occurs.</p>
<h3>Related</h3>
<p><a href="FileRecycleEmpty.htm">FileRecycleEmpty</a>, <a href="FileDelete.htm">FileDelete</a>, <a href="FileCopy.htm">FileCopy</a>, <a href="FileMove.htm">FileMove</a></p>
<h3>Example</h3>
<pre class="NoIndent">FileRecycle, C:\temp files\*.tmp</pre>

</body>
</html>
